package com.example.auth.util;

import java.util.concurrent.*;

public class ThreadPoolUtils {
    public static ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(8, 16, 3, TimeUnit.SECONDS, new ArrayBlockingQueue<>(1000),
            new ThreadFactory() {
                @Override
                public Thread newThread(Runnable r) {
                    Thread thread = new Thread(r);
                    thread.setName("im-" + ThreadLocalRandom.current().nextInt(1000));
                    return thread;
                }
            });
}
